<!DOCTYPE html>
<html>
<head>
	<title>佑道减重暨糖尿病外科中心</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="stylesheet" type="text/css" href="/templets/lossWeight/css/BMI.css">
	<script type="text/javascript" src="/templets/lossWeight/js/jquery1.42.min.js"></script>
	<meta charset="utf-8"></head>

<body>
	
	<nav class="menu">
		<div class="logo_div">
			<img src="/templets/lossWeight/images/logo.jpg"></div>
		<ul class="menu_list">
			<li>
				<a  target="_blank" href="/">首页</a>
			</li>
			<li>
				<a  target="_blank" href="/a/guanyuwomen/zhuanjiatuandui/">专家团队</a>
			</li>
			<li>
				<a  target="_blank" href="/a/cishangongyi/">慈善公益</a>
			</li>
			<li>
				<a  target="_blank" href="/a/redianguanzhu/shipinfenxiang">媒体报道</a>
			</li>
			<li>
				<a  target="_blank" href="/a/jianzhongdaren/">减重达人</a>
			</li>
			<li>
				<a  target="_blank" href="/a/laiyuanluxian/">联系我们</a>
			</li>
		</ul>
	</nav>

	<!--BMI测试-->
	<div class="BMI">
		<img src="/templets/lossWeight/images/test/BMI.jpg"/>
		<div class="Mask">
			<h1>你真的胖吗？</h1>
			<ul class="ceshi">
				<li class="ht">
					<span>身高:</span>
					<input type="text" name="height"/>
					<span>厘米</span>
				</li>
				<li class="ht">
					<span>体重:</span>
					<input type="text" name="weight"/>
					<span>公斤</span>
				</li>
				<li class="st">
					是否患有合并症:
					<label>
						<input type="radio" name="Comp"/>
						是
					</label>
					<label>
						<input type="radio" name="Comp" checked="checked"/>
						否
					</label>
				</li>
				<li class="sh">(合并症：如高血压、糖尿病、血脂异常、关节疾病等)</li>
			</ul>
			<input id="queding" type="button" value="确定"/>
		</div>
		<div class="Mask_s on">
			<div class="top">
				<div class="header clear">
					<div class="left">您的BMI为</div>
					<div class="right">
						<p id="p1"></p>
					</div>
				</div>
				<div class="footer">
					<p id="p2">
						<span>
							您有点
							<big>超重</big>
							了
						</span>
						，要抓紧锻炼+合理饮食，再胖下去可就不好减了！很多BMI > 27.5比你更胖一些的朋友，费尽辛苦都很难减回正常体重了
					</p>
				</div>
			</div>
			<div class="button">
				<h3>肥胖很可能导致</h3>
				<ul class="clear">
					<li>
						<img src="/templets/lossWeight/images/test/gaoxueya.png"/>
						<p>高血压</p>
					</li>
					<li>
						<img src="/templets/lossWeight/images/test/yichang.png"/>
						<p>血压异常</p>
					</li>
					<li>
						<img src="/templets/lossWeight/images/test/tang_02.png"/>
						<p>糖尿病</p>
					</li>
					<li>
						<img src="/templets/lossWeight/images/test/guanjie.png"/>
						<p>关节疾病</p>
					</li>
				</ul>
				<h4>等多种风险让生活不堪重负！</h4>
				<a class="a1" href="/a/BMIceshi/">返回测试</a>
				<a class="a2" href="/a/zaixianyuyue">即可寻求减重办法</a>
			</div>
		</div>
	</div>
	<!--BMI测试结束-->
	<script type="text/javascript">
	$(function() {
		$("#queding").click(function(){
         var height=$('[name="height"]').val();
	  var weight=$('[name="weight"]').val();
	  if(height==""||height==null){
		  alert('身高不能为空'); 
	  }else if(!(/^\d{1,3}$/.test(height))){
		  alert('请填写正确的身高');
	  }else if(weight==""||weight==null){
		  alert('体重不能为空'); 
	  }else if(!(/^\d{1,3}$/.test(weight))){
		  alert('请填写正确的体重');  
	  }else{ 
		  var tempHeight=height / 100;
		  var temp = tempHeight * tempHeight;
			  temp = (weight / temp).toFixed(1);
			  document.getElementById("p1").innerHTML = temp;
		  if(temp < 18.5){
			  $(".BMI .Mask_s .button .a2").css("display","none");
			  $(".BMI .Mask_s .button>h4").css("margin-top","20px");
			  $(".BMI .Mask_s .button .a1").css("margin-top","20px");
			  document.getElementById("p2").innerHTML = '<span>体重有些<big>过轻</big></span>，平常多注意营养补充就好啦～而你的肥胖好友~想要减重～可就难多了';
		  }else if(temp < 24){
			  document.getElementById("p2").innerHTML = '<span>恭喜您，体重在<big>正常范围</big>内</span>，要继续保持啊！你知道吗？身边的"胖"友，对与你的BMI，可都是可望不可及啊......';
		  }else if(temp < 27.5){
			  document.getElementById("p2").innerHTML = '<span>您有点<big>超重</big>了</span>，要抓紧锻炼+合理饮食，再胖下去可就不好减了！很多BMI > 27.5比你更胖一些的朋友，费尽辛苦都很难减回正常体重了';
		  }else if(temp < 30){
			  document.getElementById("p2").innerHTML = '<span>注意啦，您已经属于<big>一级肥胖</big>！</span>胖到这个程度已经比较危险了。要抓紧减重';
		  }else if(temp < 35){
			  document.getElementById("p2").innerHTML = '<span>注意啦，您已经属于<big>二级肥胖</big>！</span>已经相当危险了，为了身体健康，减重迫在眉睫';
		  }else{
			  document.getElementById("p2").innerHTML = '<span>您已属于<big>三级肥胖</big>！</span>再这么胖下去不光会被疾病找上门，还可能影响寿命<br>必须！马上减重了！';
		  }
		  $('.Mask').hide(500);
		  $('.Mask_s').show(500);  
	  }
   });
	})
	</script>
	<!--尾部-->
	{dede:include filename="footer.htm"/}
	<!--尾部结束-->
</body>
</html>